package com.healthcloud.service.impl;

import com.healthcloud.dao.losewisdom.LoseWisdomBpslDao;
import com.healthcloud.dto.req.losewisdom.LoseWisdomListReq;
import com.healthcloud.entity.losewisdom.LoseWisdomBpslEntity;
import com.healthcloud.service.losewisdom.LoseWisdomBpslService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.healthcloud.utils.PageParam;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;


@Service("loseWisdomBpslService")
@Transactional(rollbackFor = Exception.class)
public class LoseWisdomBpslServiceImpl implements LoseWisdomBpslService {

	@Autowired
	private LoseWisdomBpslDao loseWisdomBpslDao;
	
	@Override
	public LoseWisdomBpslEntity queryObject(Integer id){
		return loseWisdomBpslDao.queryObject(id);
	}
	
	@Override
	public List<LoseWisdomBpslEntity> queryList(LoseWisdomListReq bean, PageParam pageParam){
		return loseWisdomBpslDao.queryList(bean, pageParam);
	}
	
	@Override
	public int queryTotal(LoseWisdomListReq bean){
		return loseWisdomBpslDao.queryTotal(bean);
	}
	
	@Override
	public void save(LoseWisdomBpslEntity loseWisdomBpsl){
		loseWisdomBpsl.setCreateTime(new Date());
		loseWisdomBpslDao.save(loseWisdomBpsl);
	}
	
	@Override
	public void update(LoseWisdomBpslEntity loseWisdomBpsl){
		loseWisdomBpsl.setUpdateTime(new Date());
		loseWisdomBpslDao.update(loseWisdomBpsl);
	}
	
	@Override
	public void delete(Integer id){
		loseWisdomBpslDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		loseWisdomBpslDao.deleteBatch(ids);
	}
	
}
